package com.bluewap.core;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;


public class AppListener implements ServletContextListener{		
	public void contextDestroyed(ServletContextEvent arg0) {
		Database.releasePool();
	}

	public void contextInitialized(ServletContextEvent arg0) {
		String rootPath = arg0.getServletContext().getRealPath("/");
		Configuration config = Configuration.getInstance();
		config.setRootPath(rootPath);
	}
}
